module.exports = function($scope, formconfig, $stateParams, model){

	var id = $stateParams.id;

	formconfig.start({
		'title' : '票种详情',
		'formtitle' : '票种基本信息',
		'elements' : model(),
		'info' : {
			'url' : '/api/ac/tc/ticketType/info',
			'para' : {'id' : id}
		},
		'save' : {
			'url' : '/api/ac/tc/ticketType/update',
			'to' : 'app.tickettype_list',
			'para' : {'id' : id},
			'before' : function(form){

				var str = '#';
				for(var i = 0; i < form.result.placelist.length; i++)
				{
					var tmp = form.result.placelist[i];
					str += tmp.code + '#';
				}
				form.result['place_id_arr'] = str;
			}
		}
	}, $scope);

	$scope.form = formconfig;

};